
<div class="container" style="max-width: 600px;">
<style>
  .mt100{
    margin-top: 100px;
  }
</style>
  <form class="col s12" name="loginform">
    <div class="row">
      <div class="input-field col s12">
        <input id="username" type="text" ng-class="{'invalid':User.nameError,'validate':!User.nameError}" ng-model="User.name" ng-blur="User.checkName()">
        <label for="username" ng-class="{'active':User.rememberStuff}">手机号/邮箱</label>
        <div class="red-text text-darken-2" ng-if="User.nameError != ''" ng-bind="User.nameError"></div>
      </div>
    </div>
    <div class="row">
      <div class="input-field col s12">
        <input id="password" type="password" ng-class="{'invalid':User.passwordError,'validate':!User.passwordError}" ng-model="User.password" ng-focus="User.passwordError='';">
        <label for="password" ng-class="{'active':User.rememberStuff}">密码</label>
        <div class="red-text text-darken-2" ng-if="User.passwordError != ''" ng-bind="User.passwordError">密码错误</div>
      </div>
    </div>   
    <div class="row">
      <div class="col s12">
        <input type="checkbox" id="user-remember" checked="checked" ng-model="User.remember"/>
        <label for="user-remember">记住密码</label>
        <a href="#/forget" class="red-text text-darken-2 ml20 hover-underline">忘记密码？</a>
        <a href="#/reg" class="right red-text text-darken-2 hover-underline">立即注册</a>
      </div>
    </div>
    <div class="row">

      <div class="waves-effect waves-light btn col s12 red hoverable" ng-click="User.login()">登 录</div>
    </div>
  </form>

</div>  
